import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;


public class PicturePanel extends JPanel
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private static BufferedImage mPreviewImage = null;
	
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		if(mPreviewImage != null)
		{
			g.drawImage(mPreviewImage, 0, 0, null);
		}		
	}
	
	public void UpdateImage(BufferedImage img)
	{
		if(img != null)
		{
			mPreviewImage = img;
		}
		repaint();
		revalidate();
	}
}
